<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    22. Generate Parentheses
   </h1>
   <p>
    Given
    <i>
     n
    </i>
    pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
   </p>
   <p>
    For example, given
    <i>
     n
    </i>
    = 3, a solution set is:
   </p>
   <pre>
[
  "((()))",
  "(()())",
  "(())()",
  "()(())",
  "()()()"
]
</pre>
  </div>
  <div>
   <h1 class="question_title">
    22. 括号生成
   </h1>
   <p>
    给出&nbsp;
    <em>
     n
    </em>
    &nbsp;代表生成括号的对数，请你写出一个函数，使其能够生成所有可能的并且
    <strong>
     有效的
    </strong>
    括号组合。
   </p>
   <p>
    例如，给出&nbsp;
    <em>
     n
    </em>
    =
    <em>
    </em>
    3，生成结果为：
   </p>
   <pre>[
  "((()))",
  "(()())",
  "(())()",
  "()(())",
  "()()()"
]
</pre>
  </div>
 </body>
</html>